 

import java.awt.Dimension;
import java.awt.GridBagLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.JComboBox;

/** 
 * This class constructs the GUI for login result.  
 * @author G_14
 * @version December 2011
 */

public class result extends JPanel {

	private JLabel facLabel = null;
	/**
	 * This is the default constructor
	 * @param mes-the message received from the loginUI
	 */
	public result(int mes) {
		super();
		initialize(mes);
		
	}
	
	/**
	 * This method initializes window with the correct message received from the loginUI
	 */
	private void initialize(int mes) {
		facLabel = new JLabel();
		facLabel.setBounds(new Rectangle(15, 54, 221, 70));
		switch (mes)
		{
		//state = 1 - incorecrt pass ; 2= user does not exist ; 3 = user already logged ; 4 = success
			case 1: 
					{
						facLabel.setText("incorecct password");
						break;
					}
			case 2:
					{
						facLabel.setText("user does not exist");
						break;
					}
			case 3: 
					{
						facLabel.setText("you are already logged");
						break;
					}
			case 4: 
					{
						facLabel.setText("success");
						break;
					}
		}
		this.setSize(new Dimension(442, 189));
		this.setLayout(null);
		this.add(facLabel, null);
	}

	
}
